package com.guang.springbootrequestversion.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author liguang
 * @date 2022/5/13 15:51
 */
@Controller
public class ThymeleafTestController {

    @GetMapping(path = "thymeleafone")
    public String helloThymeleaf(Model model){
        model.addAttribute("name","wahaha");
        model.addAttribute("link","http://www.alibaba.com");
        // thymeleaf有默认的前缀templates和后缀.html
        return "hellothymeleaf";
    }

}
